#!/bin/bash

# use 'a' sed command to insert a new line after a specific localtion.
# syntax: sed '[address] a {the-line-to-append}' {input-file}

# - add new record to the test_employee.txt file after line number 
sed '2 a 203,Jack Johnson,Engineer' ./test_employee.txt


# - append given line at end of file: 
sed 'a 106,Rob Mason,Engineer' ./test_employee.txt


# - add multiple line after the line whitch matches the pattern  
#   cannot align the two line, try it and see what happen
sed '/Jason/a \
203, Jack Johnson,Engineer\
204, Mark Smith,Sales Engineer' ./test_employee.txt

cat ./test_employee.txt
